home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / Anim / MotionBlur.rx < prev    next >
Text File  |  2003-01-04  |  994b  |  77 lines

  1. /*     arexx Script */
  2.  
  3.     options results
  4.     parse ARG Port b
  5.     
  6.     ADDRESS value Port
  7.  
  8.     pp_GetDepth
  9.     D=result
  10.     IF D<24 then DO
  11.         pp_Warn 'This*script*is*only|for*24bits*Picture.'    
  12.         pp_PermitRefresh
  13.         Exit
  14.     END
  15.  
  16.     pp_GetWidth
  17.     w=result
  18.     pp_GetHeight
  19.     h=result
  20.  
  21.     pp_CountFrames
  22.     count=result
  23.     IF count<2 then DO
  24.         pp_Warn 'Make*an*Anim*first.'
  25.         pp_PermitRefresh
  26.         EXIT
  27.     END
  28.  
  29.     depth=5
  30.     pp_DialogInit 150 60 "*Motion*Blur*" 1
  31.         pp_Integer 0 70 8 50 16 "Depth" 1 depth
  32.     pp_Dialog
  33.     rc=result
  34.     IF rc=0 then DO
  35.         EXIT
  36.     END        
  37.  
  38.     pp_GetDialog 0
  39.     depth=result
  40.  
  41.     pp_EffectOff
  42.  
  43.     pp_GetCurrentBrush
  44.     CB=result
  45.     pp_FindEmptyBrush
  46.     Brush=result
  47.     pp_SetBrush Brush
  48.  
  49.     do i=1 to count
  50.         j=i-depth
  51.         if j<1 then DO
  52.             j=1
  53.         end
  54.         if j<i then do
  55.             pp_gotoframe j
  56.             pp_picttospare
  57.             do jj=j+1 to i
  58.                 pp_Gotoframe jj
  59.                 pp_Pickbrush 0 0 w h 1
  60.                 pp_Spareonoff
  61.                 pp_brushopacity 50
  62.                 pp_plot w/2 h/2
  63.             end
  64.             pp_gotoframe i
  65.             pp_SparetoPict
  66.         end
  67.     end
  68.  
  69.     pp_BrushOpacity 100
  70.     pp_FreeBrush
  71.     pp_SetBrush CB
  72.  
  73. EXIT
  74.  
  75.  
  76.  
  77.